home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / tcl / tcl70b2.lha / tcl7.0b2 / Makefile.in < prev    next >
Makefile  |  1993-07-19  |  8KB  |  250 lines

  1. #
  2. # This file is a Makefile for Tcl.  If it has the name "Makefile.in"
  3. # then it is a template for a Makefile;  to generate the actual Makefile,
  4. # run "./configure", which is a configuration script generated by the
  5. # "autoconf" program (constructs like "@foo@" will get replaced in the
  6. # actual Makefile.
  7.  
  8. #----------------------------------------------------------------
  9. # Things you can change to personalize the Makefile for your own
  10. # site (you can make these changes in either Makefile.in or
  11. # Makefile, but changes to Makefile will get lost if you re-run
  12. # the configuration script).
  13. #----------------------------------------------------------------
  14.  
  15. # Default top-level directories in which to install architecture-
  16. # specific files (exec_prefix) and machine-independent files such
  17. # as scripts (prefix).  The values specified here may be overridden
  18. # at configure-time with the --exec-prefix and --prefix options
  19. # to the "configure" script.
  20.  
  21. exec_prefix =    /usr/local
  22. prefix =    /usr/local
  23.  
  24. # Directory in which to install the library of Tcl scripts (note:
  25. # you can set the TCL_LIBRARY environment variable at run-time to
  26. # override the compiled-in location):
  27. TCL_LIBRARY =    $(prefix)/lib/tcl
  28.  
  29. # Directory in which to install the archive libtcl.a:
  30. LIB_DIR =    $(exec_prefix)/lib
  31.  
  32. # Directory in which to install the program tclsh:
  33. BIN_DIR =    $(exec_prefix)/bin
  34.  
  35. # Directory in which to install the include file tcl.h:
  36. INCLUDE_DIR =    $(prefix)/include
  37.  
  38. # Top-level directory for manual entries:
  39. MAN_DIR =    $(prefix)/man
  40.  
  41. # Directory in which to install manual entry for tclsh:
  42. MAN1_DIR =    $(MAN_DIR)/man1
  43.  
  44. # Directory in which to install manual entries for Tcl's C library
  45. # procedures:
  46. MAN3_DIR =    $(MAN_DIR)/man3
  47.  
  48. # Directory in which to install manual entries for the built-in
  49. # Tcl commands:
  50. MANN_DIR =    $(MAN_DIR)/mann
  51.  
  52. # To change the compiler switches, for example to change from -O
  53. # to -g, change the following line:
  54. CC_SWITCHES = -O
  55.  
  56. # To disable ANSI-C procedure prototypes reverse the comment characters
  57. # on the following lines:
  58. PROTO_FLAGS =
  59. #PROTO_FLAGS = -DNO_PROTOTYPE
  60.  
  61. # Mathematical functions like sin and atan2 are enabled for expressions
  62. # by default.  To disable them, reverse the comment characters on the
  63. # following pairs of lines:
  64. MATH_FLAGS =
  65. #MATH_FLAGS = -DTCL_NO_MATH
  66. MATH_LIBS = -lm
  67. #MATH_LIBS =
  68.  
  69. # If you would like for Tcl to override the UNIX functions "setenv",
  70. # "unsetenv", and "putenv", so that the "env" variable automatically
  71. # gets updated whenever these functions are called, then reverse the
  72. # comment characters on the following two lines:
  73. ENV_FLAGS =
  74. # ENV_FLAGS = -DTclSetEnv=setenv -DTclUnsetEnv=unsetenv -DTclPutEnv=putenv
  75.  
  76. # To compile for non-UNIX systems (so that only the non-UNIX-specific
  77. # commands are available), reverse the comment characters on the
  78. # following pairs of lines.  In addition, you'll have to provide your
  79. # own replacement for the "panic" procedure (see panic.c for what
  80. # the current one does).
  81. GENERIC_FLAGS =
  82. #GENERIC_FLAGS = -DTCL_GENERIC_ONLY
  83. UNIX_OBJS = panic.o tclEnv.o tclGlob.o tclMain.o tclUnixAZ.o \
  84.     tclUnixStr.o tclUnixUtil.o
  85. #UNIX_OBJS =
  86.  
  87. # To enable memory debugging reverse the comment characters on the following
  88. # lines.  Warning:  if you enable memory debugging, you must do it
  89. # *everywhere*, including all the code that calls Tcl, and you must use
  90. # ckalloc and ckfree everywhere instead of malloc and free.
  91. MEM_DEBUG_FLAGS =
  92. #MEM_DEBUG_FLAGS = -DTCL_MEM_DEBUG
  93.  
  94. # Some versions of make, like SGI's, use the following variable to
  95. # determine which shell to use for executing commands:
  96. SHELL =        /bin/sh
  97.  
  98. #----------------------------------------------------------------
  99. # The information below is modified by the configure script when
  100. # Makefile is generated from Makefile.in.  You shouldn't normally
  101. # modify any of this stuff by hand.
  102. #----------------------------------------------------------------
  103.  
  104. COMPAT_OBJS =        @LIBOBJS@
  105. AC_FLAGS =        @DEFS@
  106. INSTALL =        @INSTALL@
  107. INSTALL_PROGRAM =    @INSTALL_PROGRAM@
  108. INSTALL_DATA =        @INSTALL_DATA@
  109. RANLIB =        @RANLIB@
  110. SRC_DIR =        @srcdir@
  111. VPATH =            @srcdir@
  112.  
  113. #----------------------------------------------------------------
  114. # The information below should be usable as is.  The configure
  115. # script won't modify it and you shouldn't need to modify it
  116. # either.
  117. #----------------------------------------------------------------
  118.  
  119.  
  120. CC =        cc
  121. CFLAGS =    ${CC_SWITCHES} -I. -I${SRC_DIR} ${AC_FLAGS} ${MATH_FLAGS} \
  122. ${ENV_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} ${MEM_DEBUG_FLAGS} \
  123. -DTCL_LIBRARY=\"${TCL_LIBRARY}\"
  124.  
  125. GENERIC_OBJS =    regexp.o tclBasic.o tclCkalloc.o tclCmdAH.o \
  126.     tclCmdIL.o tclCmdMZ.o tclExpr.o tclGet.o tclHash.o \
  127.     tclHistory.o tclLink.o tclParse.o tclProc.o \
  128.     tclUtil.o tclVar.o
  129.  
  130. OBJS = ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS}
  131.  
  132. all: libtcl.a tclsh
  133.  
  134. libtcl.a: ${OBJS}
  135.     rm -f libtcl.a
  136.     ar cr libtcl.a ${OBJS}
  137.     $(RANLIB) libtcl.a
  138.  
  139. tclsh: tclAppInit.o libtcl.a
  140.     ${CC} ${CFLAGS} tclAppInit.o libtcl.a ${MATH_LIBS} -o tclsh
  141.  
  142. tcltest: tclTest.o libtcl.a
  143.     ${CC} ${CFLAGS} tclTest.o libtcl.a ${MATH_LIBS} -o tcltest
  144.  
  145. test: tcltest
  146.     @cwd=`pwd`; \
  147.     cd $(SRC_DIR); TCL_LIBRARY=`pwd`/library; export TCL_LIBRARY; \
  148.     cd $$cwd; ( echo cd $(SRC_DIR)/tests\; source all ) | ./tcltest
  149.  
  150. install: install-binaries install-libraries
  151.  
  152. install-binaries: libtcl.a tclsh
  153.     @for i in $(LIB_DIR) $(BIN_DIR) ; \
  154.         do \
  155.         if [ ! -d $$i ] ; then \
  156.         echo "Making directory $$i"; \
  157.         mkdir $$i; \
  158.         chmod 755 $$i; \
  159.         else true; \
  160.         fi; \
  161.         done;
  162.     @echo "Installing libtcl.a"
  163.     @$(INSTALL_DATA) libtcl.a $(LIB_DIR)
  164.     @$(RANLIB) $(LIB_DIR)/libtcl.a
  165.     @echo "Installing tclsh"
  166.     @$(INSTALL_PROGRAM) tclsh $(BIN_DIR)
  167.  
  168. install-libraries:
  169.     @for i in $(prefix)/lib $(INCLUDE_DIR) $(TCL_LIBRARY) \
  170.         $(MAN_DIR) $(MAN1_DIR) $(MAN3_DIR) $(MANN_DIR) ; \
  171.         do \
  172.         if [ ! -d $$i ] ; then \
  173.         echo "Making directory $$i"; \
  174.         mkdir $$i; \
  175.         chmod 755 $$i; \
  176.         else true; \
  177.         fi; \
  178.         done;
  179.     @echo "Installing tcl.h"
  180.     @$(INSTALL_DATA) $(SRC_DIR)/tcl.h $(INCLUDE_DIR)
  181.     @cd $(SRC_DIR)/library; for i in *.tcl tclIndex; \
  182.         do \
  183.         echo "Installing library/$$i"; \
  184.         $(INSTALL_DATA) $$i $(TCL_LIBRARY); \
  185.         done;
  186.     @cd $(SRC_DIR)/doc; for i in *.1; \
  187.         do \
  188.         echo "Installing doc/$$i"; \
  189.         rm -f $(MAN1_DIR)/$$i; \
  190.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  191.             $$i > $(MAN1_DIR)/$$i; \
  192.         chmod 444 $(MAN1_DIR)/$$i; \
  193.         done;
  194.     @cd $(SRC_DIR)/doc; for i in *.3; \
  195.         do \
  196.         echo "Installing doc/$$i"; \
  197.         rm -f $(MAN3_DIR)/$$i; \
  198.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  199.             $$i > $(MAN3_DIR)/$$i; \
  200.         chmod 444 $(MAN3_DIR)/$$i; \
  201.         done;
  202.     @cd $(SRC_DIR)/doc; for i in *.n; \
  203.         do \
  204.         echo "Installing doc/$$i"; \
  205.         rm -f $(MANN_DIR)/$$i; \
  206.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  207.             $$i > $(MANN_DIR)/$$i; \
  208.         chmod 444 $(MANN_DIR)/$$i; \
  209.         done;
  210.  
  211. Makefile: $(SRC_DIR)/Makefile.in
  212.     $(SHELL) config.status
  213.  
  214. clean:
  215.     rm -f *.a *.o core errs *~ \#* TAGS *.E a.out errors tclsh tcltest
  216.  
  217. distclean: clean
  218.     rm -f Makefile config.status
  219.  
  220. getcwd.o: $(SRC_DIR)/compat/getcwd.c
  221.     $(CC) -c $(CFLAGS) $(SRC_DIR)/compat/getcwd.c
  222.  
  223. opendir.o: $(SRC_DIR)/compat/opendir.c
  224.     $(CC) -c $(CFLAGS) $(SRC_DIR)/compat/opendir.c
  225.  
  226. strerror.o: $(SRC_DIR)/compat/strerror.c
  227.     $(CC) -c $(CFLAGS) $(SRC_DIR)/compat/strerror.c
  228.  
  229. strstr.o: $(SRC_DIR)/compat/strstr.c
  230.     $(CC) -c $(CFLAGS) $(SRC_DIR)/compat/strstr.c
  231.  
  232. strtod.o: $(SRC_DIR)/compat/strtod.c
  233.     $(CC) -c $(CFLAGS) $(SRC_DIR)/compat/strtod.c
  234.  
  235. strtol.o: $(SRC_DIR)/compat/strtol.c
  236.     $(CC) -c $(CFLAGS) $(SRC_DIR)/compat/strtol.c
  237.  
  238. strtoul.o: $(SRC_DIR)/compat/strtoul.c
  239.     $(CC) -c $(CFLAGS) $(SRC_DIR)/compat/strtoul.c
  240.  
  241. tmpnam.o: $(SRC_DIR)/compat/tmpnam.c
  242.     $(CC) -c $(CFLAGS) $(SRC_DIR)/compat/tmpnam.c
  243.  
  244. waitpid.o: $(SRC_DIR)/compat/waitpid.c
  245.     $(CC) -c $(CFLAGS) $(SRC_DIR)/compat/waitpid.c
  246.  
  247. ${OBJS}: $(SRC_DIR)/tcl.h $(SRC_DIR)/tclInt.h
  248. ${UNIX_OBJS}: $(SRC_DIR)/tclUnix.h
  249. tclCmdIL.o: $(SRC_DIR)/patchlevel.h
  250.